package org.ala.tcp_feign_common.msg.login;

import org.ala.tcp_feign_common.enums.TcpFeignMessageTypeEnums;
import org.ala.tcp_feign_common.msg.AbstractByteMessage;


/**
 * 登录回执
 *
 * @author 骆毅(ala)
 * @date 2024年4月19日
 */
public class LoginACKByteMessage extends AbstractByteMessage {
	private static final long serialVersionUID = 1L;
	
	
	/**
	 * 登录是否成功
	 */
	protected boolean success;
	
	
	public static LoginACKByteMessage success() {
		LoginACKByteMessage msg = new LoginACKByteMessage();
		msg.setSuccess(true);
		return msg;
	}
	public static LoginACKByteMessage faild() {
		LoginACKByteMessage msg = new LoginACKByteMessage();
		msg.setSuccess(false);
		return msg;
	}
	

	@Override
	public TcpFeignMessageTypeEnums type() {
		return TcpFeignMessageTypeEnums.LOGIN_ACK;
	}


	public boolean isSuccess() {
		return success;
	}


	public void setSuccess(boolean success) {
		this.success = success;
	}

}
